import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../res/button_style.dart';
import '../res/colors.dart';
import '../res/style.dart';

class SubmitBtnItem extends StatelessWidget {
  Function()? onTap;
  String title = '';

  SubmitBtnItem({Key? key, this.title = '', this.onTap}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: 50.h,
      margin: const EdgeInsets.only(left: 25, right: 25).r,
      decoration: const BoxDecoration(
        color: ColorStyle.color_backgroud4,
        borderRadius: BorderRadius.all(Radius.circular(8)),
        boxShadow: [
          BoxShadow(
            color: ColorStyle.color_home,
            offset: Offset(0, 0),
            blurRadius: 1,
            spreadRadius: 0,
          ),
        ],
      ),
      child: TextButton(
        style: ButtonStyles.getButtonStyle(),
        onPressed: () {
          if (onTap != null) {
            onTap!();
          }
        },
        child: Text(
          title,
          style: Styles.style_white_16,
        ),
      ),
    );
  }
}
